<template>
    <div>
<el-dialog center width="50%" custom-class="select-sheet-card-div" 
    :visible.sync="LogingCard"
    :close-on-press-escape="false" 
    :close-on-click-modal="false" 
    :show-close="false"
    :destroy-on-close="true">
    <div slot="title" class="div-text-align-right">
        <img src="@/assets/images/button/62.png" @click="closeSheet" width="46" height="46" alt="">
    </div>
    <div class="div-text-align-center">
        <div class="bad-card-info"  v-if="PlayerInfo.identity == 2">
            <h1 class="color-red">
                卧底牌
            </h1>
        </div>
        <div class="bad-card-info" v-if="PlayerInfo.identity == 3">
            <h1 class="color-yellow">
                双面间谍
            </h1>
        </div>
        <div class="goods-card-info" v-if="PlayerInfo.identity == 1">
            <h1 class="color-bule">
                好人卡
            </h1>
            <div class="goods-card-info-content" style="margin-top: 30px;">
                <p class="card-info-content" style="color:#FDD017" v-for="(items, index) in PlayerInfo.task" :key="index">
                    任务 {{ index + 1 }}: {{ items }}
                </p>
            </div>
        </div>
        <div slot="footer" class="dialog-footer" style="position: absolute; left: 0; bottom: 13%; width: 100%;">
            <p class="card-info-content" style="margin-top: 20px;" v-if="PlayerInfo.identity == 1">注意观察，揪出所有卧底，共同胜利！</p>
            <p class="card-info-content" style="margin-top: 20px;" v-else>隐藏好自己，炸团行动开始啦～！</p>
        </div>
    </div>
</el-dialog>
    </div>
</template>

<script>
export default {
    name:'uioCard',
    props:{
        LogingCard:{
            required: true,//是否是必要传值  可不要时为 false
            type: Boolean, //定义类型 类型  ：字符串类型、
            default: false,   //没有传值的话 默认值 一般与 required:false 一起用
        },
        PlayerInfo: {
            required: true,//是否是必要传值  可不要时为 false
            type: Object, //定义类型 类型  ：字符串类型、
            default: {},   //没有传值的话 默认值 一般与 required:false 一起用
        }
    },
    data() {
        return {
        }
    },
    watch:{
        LogingCard: {
            handler(newValue, oldValue) {
                console.log("dialogTransfer newValue, oldValue :", newValue, oldValue, this.PlayerInfo);
            },
            deep: true,
        },
    },
    created() {
        
    },
    methods: {
        closeSheet() {
            this.$emit('closeDialog', 'logingCard', false, 'click_two');
        },
    },
}
</script>


<style scoped>

</style>



